#!/usr/bin/env python
# -*- coding:utf-8 -*-

r"""
defin handle url
"""
from framework.controller import Controller
from framework.admincontroller import AdminController
from controllers.index import IndexCtrl
from controllers.login import LoginCtrl
from controllers.login import LogoutCtrl
from controllers.admin import AdminCtrl
from controllers.fuwachat import FuwaChatCtrl
from controllers.fuwa import FuwaCtrl
from controllers.apply import ApplyCtrl
from controllers.task import TaskCtrl
from controllers.stat import StatCtrl
from controllers.test import TestCtrl
# user
from controllers.user_index import UserIndexCtrl

routes = [
    (r"/", IndexCtrl),
    (r"/index", IndexCtrl),
    (r"/index/", IndexCtrl),
    (r"/index.html", IndexCtrl),
    (r"/login/", LoginCtrl),
    (r"/login", LoginCtrl),
    (r"/logout", LogoutCtrl),
    (r"/admin/mpass", AdminCtrl),  # modify admin password
    (r"/fuwachat/(.*)", FuwaChatCtrl),
    (r"/fuwachat", FuwaChatCtrl),
    (r"/fuwa(.*)", FuwaCtrl),
    (r'/apply(.*)', ApplyCtrl),
    # (r"/fuwa(/[a-z]+)/([0-9]+)", FuwaCtrl),
    (r'/task', TaskCtrl),
    (r'/stat(.*)', StatCtrl),
    (r'/test', TestCtrl),
    # user
    (r'/user(.*)', UserIndexCtrl),
    # (r".*", Controller)
    (r'.*', AdminController)
]
